<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2022\5\23 0023
 * Time: 13:14
 */
phpinfo();
die();
/*************************************
 * PHP amqp(RabbitMQ) Demo - consumer
 * Author: Linvo
 * Date: 2012/7/30
 *************************************/
//配置信息
$conn_args = array(
    'host' => '192.168.1.109',
    'port' => '5672',
    'login' => 'xiaobao',
    'password' => '123456',
    'vhost'=>'/'
);
$e_name = 'e_linvo'; //交换机名
$q_name = 'q_linvo'; //队列名
$k_route = 'key_1'; //路由key


//创建连接和channel
$conn = new AMQPConnection($conn_args);
if (!$conn->connect()) {
    die("Cannot connect to the broker!\n");
}
$channel = new AMQPChannel($conn);